home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
FILE-TD.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
55 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME FILE-TD .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NB02.INC"
COLOR 7, 0
CLS
? "┌────────────────────────────────────────────────────────────────────────
? "│ SetTimeDate ( FileName$, Tyme$, Dyte$ )
? "├────────────────────────────────────────────────────────────────────────
? "│ Sometimes it is necessary or desirable to change a file's date and/or
? "│ time stamp. This sub will allow you to do either or both quite easily
? "│ and uses the time/date format(s) you have set-up for your program.
? "│
? "│ One handy place to use this type routine is with data files. You can
? "│ set the time/date then use that info to tell when the file was last
? "│ accessed, written to, etc. I use it to set the date and time on the
? "│ files in this library so I can tell which version (time) I've got and
? "│ the date of last access, etc.
? "└────────────────────────────────────────────────────────────────────────
?
'┌──────────────────────────────
FileName$ = "DUMMY.DAT" '│ our test file
OPEN "B", #1, FileName$ '│ open it
PUT$ #1, "THIS IS JUNK" '│ write some junk to it
CLOSE '│ close it
'│
F$ = fDIR$( FileName$, 255, 255 ) '│ display original file specs
PRINT "THE ORIGINAL DATA: "; F$ '│ 255=&b11111111 for everything
'│
SetTimeDate FileName$, "12:12", "01-01-99" '│ change them
'│
F$ = fDIR$( FileName$, 255, 255 ) '│ display the new settings
PRINT "THE CHANGED DATA: "; F$ '│
'│
KILL FileName$ '│ kill it as we don't need it
'└───────────────────────────────